home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / AIIe / TN.AIIE.010 < prev   
Encoding:
Text File  |  1991-06-28  |  19.5 KB  |  445 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIe
  8. #10:         The Apple IIe Card for the Macintosh LC
  9.  
  10. Written by:  Jim Luther, Rob Moore, John Arkley, Mike Askins
  11.              & Paul Wenker                                          July 1991
  12.  
  13. This Technical Note discusses all the miscellaneous differences we know of 
  14. between an enhanced Apple IIe and the Apple IIe Card for the Macintosh LC 
  15. running version 1.0 of the IIe Startup application.  This Note also contains 
  16. routines needed to check and change the speed of the Apple IIe Card.
  17. _____________________________________________________________________________
  18.  
  19. The Apple IIe Card for the Macintosh LC was designed to act as much like an 
  20. enhanced Apple IIe as possible.  For this reason, you should refer to the 
  21. Apple IIe Technical Reference Manual for most technical information.  
  22. However, our implementation of an Apple IIe is not completely perfect, so 
  23. that's why we wrote this Note.  The next several sections of this Note 
  24. describe the differences we know of between an enhanced Apple IIe and the 
  25. Apple IIe Card for the Macintosh LC.  The AppleJIIe Card can be identified 
  26. using the routine in Apple II Miscellaneous Technical Note #2 or the 
  27. identification bytes listed in Apple II Miscellaneous Technical Note #7.
  28.  
  29.  
  30. Keyboard
  31.  
  32. The Apple IIe Card option panel allows the user to set three keyboard 
  33. parameters not available on an Apple IIe:  delay until repeat, repeat rate, 
  34. and type ahead.  The ability to set these parameters is also available on the 
  35. Apple IIgs.  If your application has trouble with the settings of any of 
  36. these parameters, your documentation should make note of it.
  37.  
  38. The keyboard layout available to the user of an Apple IIe Card may be quite 
  39. different than an AppleJIIe since any Apple Desktop Bus (ADB) keyboard might 
  40. be attached to the Macintosh LC.  Because of the variations in ADB keyboard 
  41. layouts, applications should not depend on any specific key placement.
  42.  
  43. The single-wire Shift-key modification which allows software to read the 
  44. state of the shift-key with the PB2 switch input is not implemented.
  45.  
  46.  
  47. Game I/O Signals
  48.  
  49. The game I/O signals are all handled by the Apple IIe Card hardware.  The 
  50. only game I/O signals available from the Apple IIe Card are those available 
  51. at the 9 pin D-type miniature connector.  The Apple IIe Card does not have a 
  52. 16-pin DIP socket for game I/O signals, so the AN0-AN3 annunciator outputs 
  53. and the STROBE+ output are not available.
  54.  
  55.  
  56.  
  57. Soft Switch Differences
  58.  
  59. The following soft switches are not implemented on the Apple IIe Card:
  60.  
  61. Name      Access    Address    Comment
  62. ----------------------------------------------------------------
  63. CASSIN    R         $C060      There is no cassette I/O
  64. CASSO     W         $C020      There is no cassette I/O
  65. IOUDIS    W         $C07E      There is no IOU to disable
  66. IOUDIS    W         $C07F      There is no IOU to enable
  67. RDIOUDIS  R7        $C07E      There is no IOUDIS switch to read
  68.  
  69. The RDDHIRES ($C07F) soft switch is not implemented in version 1.0 of the IIe 
  70. Startup application.  This soft switch may or may not be implemented in a 
  71. future version of the IIe Startup application.
  72.  
  73. The VBL ($C019) soft switch cycles at 60 Hz, but it is not synchronized with 
  74. the Macintosh LC video.  This may cause flicker in some animation displays 
  75. that depend on VBLs.
  76.  
  77.  
  78. Monitor Routines
  79.  
  80. Several Monitor routine act different on the Apple IIe Card then they do on 
  81. an Apple IIe.  Here's a list of those routines:
  82.  
  83. Subroutine    Address    Comment
  84. -----------------------------------------------------------------------------
  85. BELL          $FF3A      The Apple IIe Card option panel allows the bell tone 
  86.                          produced by the BELL subroutines to be set to a
  87.                          Macintosh sound.  BELL on an Apple IIe will generate
  88.                          a 1 kHz tone for approximately 0.1 second.  Since
  89.                          the duration of Macintosh sounds may or may not be
  90.                          0.1 second (most sounds are much longer than 0.1
  91.                          second), you should not depend on the BELL
  92.                          subroutines for timing.
  93. BELL1         $FBDD      See BELL.
  94. GETLN         $FD6A      The GETLN input subroutines treats the Delete key
  95.                          the same as the Backspace key (,).  This is the same
  96.                          way the Delete key is treated by GETLN on an Apple
  97.                          IIgs.  The AppleSoft BASIC INPUT statement calls 
  98.                          GETLN, so it is also affected.
  99. GETLNZ        $FD67      See GETLN.
  100. GETLN1        $FD6F      See GETLN.
  101. PREAD         $FB1E      The PREAD subroutine timing is not adjusted for the 
  102.                          fast (1.9JMHz) 65C02 processor speed.  The AppleSoft 
  103.                          BASIC PDL function calls PREAD, so it is also 
  104.                          affected.
  105. READ          $FEFD      The READ cassette subroutine is not implemented and 
  106.                          consists of a single RTS instruction.
  107. WAIT          $FDA8      The WAIT subroutine timing is not adjusted for the 
  108.                          fast (1.9JMHz) 65C02 processor speed.
  109. WRITE         $FECD      The WRITE cassette subroutine is not implemented and 
  110.                          consists of a single RTS instruction.
  111.  
  112.  
  113.  
  114. Memory Access and Timing
  115.  
  116. When the 65C02 accesses certain key I/O locations or writes to the active 
  117. Apple IIe display memory, it is "Trapped" (or halted temporarily) and the 
  118. address accessed and data read or written is latched so the information is 
  119. available to the IIe Startup application running on the MacintoshJLC.  After 
  120. the IIe Startup application has gathered the data, it allows the 65C02 to 
  121. continue.  Access to Trapped memory locations will cause problems with timing 
  122. sensitive 65C02 code.  The following table lists the Trapped access areas and 
  123. what type of access (Read or Write) will cause the Trap to activate on the 
  124. Apple IIe Card 
  125.  
  126. Address       R/W      Description
  127. -----------------------------------------------------
  128. Display Areas
  129. $400-7FF      Write    Text/LoRes page 1 stores
  130. $800-BFF      Write    Text/LoRes page 2 stores
  131. $2000-3FFF    Write    HiRes/Dbl-HiRes page 1 stores
  132. $4000-5FFF    Write    HiRes/Dbl-HiRes page 2 stores
  133.  
  134. Internal Soft Switch and I/O Areas
  135. $C000-C001    Write    80STORE soft switches
  136. $C00C-C00D    Write    80COL soft switches
  137. $C00E-C00F    Write    ALTCHARSET soft switches
  138. $C050-C057    R/W      Display soft switches
  139. $C058-C05F    R/W      Annunciators
  140. $C070         R/W      PDLTRIG
  141.  
  142. I/O Slot accesses
  143. $C090-C09F    R/W      Slot 1 Hardware accesses
  144. $C0A0-C0AF    R/W      Slot 2 Hardware accesses
  145. $C0B0-C0BF    R/W      Slot 3 Hardware accesses
  146. $C0C0-C0CF    R/W      Slot 4 Hardware accesses
  147. $C0D0-C0DF    R/W      Slot 5 Hardware accesses
  148. $C0E8-C0E9    R/W      Slot 6 Disk 5.25" Motor on/off switch
  149. $C0F0-C0FF    R/W      Slot 7 Hardware accesses
  150. $CFFF         R/W      Shared $C8-space switch
  151.  
  152. Notes:
  153. 1.    The "Screen-Hole" areas in the above address ranges do not trap.  These
  154.       are the $xx78-7F and $xxF8-FF address ranges in the display areas.
  155. 2.    Display writes do not trap when the Slot 6 motor switch is on.
  156. 3.    The auxiliary text pages will be trapped whenever 80COL ($C00D) is on, 
  157.       unless the current screen mode is a full screen graphics mode.
  158. 4.    The auxiliary HiRes pages will be trapped only when Double HiRes is 
  159.       being displayed.
  160.  
  161.  
  162. Cassette I/O
  163.  
  164. The Apple IIe Card does not have the cassette tape input and output miniature 
  165. phone jacks and the Monitor cassette routines READ and WRITE do nothing.
  166.  
  167.  
  168. 65C02 Processor Speed
  169.  
  170. The 65C02 processor on the Apple IIe Card can be run at two speeds; the 
  171. normal Apple IIe 1 MHz or a fast speed of approximately 1.9 MHz.  Normally, 
  172. the 65C02 processor speed setting should be left at whatever the user of the 
  173. system set it to with the Apple IIe Card option panel.  However, we know 
  174. there are some times when an application must change the speed of the system 
  175. so we've provided safe routines to change the speed and to obtain the speed 
  176. setting of the Apple IIe Card option panel.  Below are four short assembly 
  177. language routines you can use to manipulate the 65C02 processor speed of the 
  178. Apple IIe Option Card for the Macintosh LC.
  179.  
  180. Warning:    You must ensure your application is running on an Apple IIe Card 
  181.             before calling these routines.  See Apple II Miscellaneous
  182.             Technical Notes #2 and #7 for Apple II Family identification 
  183.             information.
  184.  
  185. ;----------------------------------------------------------------------------
  186. -
  187. ;
  188. ; GetOptPanelSpeed
  189. ;
  190. ; Get the option panel's current speed setting. This may or may not be the
  191. ; current speed of the Apple IIe Option Card -- It is the speed the user has
  192. ; asked for via the option panel.
  193. ;
  194. ; The A, X and Y registers are not changed.
  195. ; The n, z and c flags are affected.
  196. ; The c flag (carry) will hold result:
  197. ;     0 = Normal Speed
  198. ;     1 = Fast Speed
  199. ;
  200. ; WARNING:  Location $c05c is a read-only soft switch. You must never
  201. ; modify the contents of this location.
  202. ;
  203. ;----------------------------------------------------------------------------
  204. -
  205. ;
  206. GetOptPanelSpeed    pha                 ; store the A reg
  207.                     lda $c05c           ; get option panel speed (in bit 2)
  208.                     lsr a               ; and move it into the carry flag
  209.                     lsr a
  210.                     lsr a
  211.                     pla                 ; restore the A reg
  212.                     rts
  213.  
  214. ;----------------------------------------------------------------------------
  215. -
  216. ;
  217. ; SetToOptPanelSpeed
  218. ;
  219. ; Get the option panel's current speed setting and set the Apple IIe Option
  220. ; Card to that speed.
  221. ;
  222. ; The A, X and Y registers are not changed.
  223. ; The n, z and c flags are affected.
  224. ;----------------------------------------------------------------------------
  225. -
  226. ;
  227. SetToOptPanelSpeed  jsr GetOptPanelSpeed ; Get the default speed
  228.                     bcs SetFastSpeed    ; branch to SetFastSpeed
  229. ;                   bcc SetNormalSpeed  ; fall through to SetNormalSpeed
  230.  
  231.  
  232. ;----------------------------------------------------------------------------
  233. -
  234. ;
  235. ; SetNormalSpeed
  236. ;
  237. ; Set the Apple IIe Option Card to "Normal" speed.
  238. ;
  239. ; The A, X and Y registers are not changed.
  240. ; The z flag may be changed.
  241. ;
  242. ; WARNING:  All bits at location $c02b are reserved except for bit 3.
  243. ; In order to manipulate bit 3 at location $c02b and leave the other
  244. ; reserved bits untouched, you must use a read-modify-write technique.
  245. ; The test-and-set-bit (TSB) instruction or the test-and-reset-bit (TSR)
  246. ; instruction can be used to accomplish this.  Both of these instructions
  247. ; allow you to modify any one bit and leave the others untouched.
  248. ;
  249. ;----------------------------------------------------------------------------
  250. -
  251. ;
  252. SetNormalSpeed      pha
  253.                     lda #$04
  254.                     trb $c02b           ;reset bit 2 to 0
  255.                     pla
  256.                     rts
  257.  
  258. ;----------------------------------------------------------------------------
  259. -
  260. ;
  261. ; SetFastSpeed
  262. ;
  263. ; Set the Apple IIe Option Card to "Fast" speed.
  264. ;
  265. ; The A, X and Y registers are not changed.
  266. ; The z flag may be changed.
  267. ;
  268. ; WARNING:  All bits at location $c02b are reserved except for bit 3.
  269. ; In order to manipulate bit 3 at location $c02b and leave the other
  270. ; reserved bits untouched, you must use a read-modify-write technique.
  271. ; The test-and-set-bit (TSB) instruction or the test-and-reset-bit (TSR)
  272. ; instruction can be used to accomplish this.  Both of these instructions
  273. ; allow you to modify any one bit and leave the others untouched.
  274. ;
  275. ;----------------------------------------------------------------------------
  276. -
  277. ;
  278. SetFastSpeed        pha
  279.                     lda #$04
  280.                     tsb $c02b           ;set bit 2 to 1
  281.                     pla
  282.                     rts
  283.  
  284.  
  285. Peripheral Cards
  286.  
  287. The Apple IIe Card does not have any real peripheral cards.  Instead, it has 
  288. a simulated slot architecture that allows pseudo-I/O devices to be flexibly 
  289. mapped into the various Apple II I/O slot spaces.  The subsections or this 
  290. section describe the various pseudo-I/O devices available to the Apple IIe 
  291. Card.
  292.  
  293. Video
  294.  
  295. The 80-column video firmware is always in slot 3.  The 80-column firmware 
  296. acts just like the 80-column firmware in an Apple IIe or IIc.  The Macintosh 
  297. LC monitor is always used for the display device.  There is no NTSC 
  298. compatible video signal available from the Apple IIe Card.
  299.  
  300. The Apple IIe Card option panel allows the user to set the display to 
  301. monochrome or color.  When the display is in color mode, the "color fringes" 
  302. seen in Apple IIe graphics may be more distinct on the high resolution color 
  303. video monitors used with the Macintosh LC than they are on composite color 
  304. video monitors or television sets commonly used with the Apple IIe.
  305.  
  306. The character set used by the Apple IIe Card is the same character set used 
  307. on the enhanced AppleJIIe with two differences: the character set can be 
  308. either normal or inverse by the Apple IIe Card option panel and the flashing 
  309. display format does not flash.  When the inverse character set is selected, 
  310. the whole text display is inverted (graphics display modes are not affected).  
  311. When the flashing display format is used, characters are shown as black text 
  312. on a red background (or red text on a black background if the inverse 
  313. character set is selected).
  314.  
  315. The IIe Startup application updates the Macintosh LC's display every time a 
  316. change is made to the active display pages in the Apple IIe Card's RAM.  
  317. Applications that attempt to animate over 1/3 of the display screen will not 
  318. perform as fast on the Apple IIe Card as the do an Apple IIe.  See the Memory 
  319. Access and Timing section of this Note for more information.
  320.  
  321. Memory Card
  322.  
  323. The memory card device can be mapped to any slot space except slot 3 (where 
  324. the video firmware always resides) or slot 6 (where the Apple Disk 5.25 
  325. always resides).
  326.  
  327. The memory card pseudo-I/O device looks like an Apple II Memory Expansion 
  328. Card.  It can be accessed through firmware routines or it can be accessed via 
  329. hardware I/O addresses.  It can be configured to have 256K, 512K, 768K or 
  330. 1024K RAM with the Apple IIe Card option panel.
  331.  
  332. Modem and Printer Ports
  333.  
  334. The modem and printer port devices can be mapped to any slot space except 
  335. slot 3 (where the video firmware always resides) or slot 6 (where the Apple 
  336. Disk 5.25 always resides).
  337.  
  338. The modem and printer ports pseudo-I/O devices look very much like Apple 
  339. Super Serial Cards.  They are compatible with software that uses the standard 
  340. BASIC or Pascal firmware entry points of an Super Serial Card and with most 
  341. software that talks directly to the 6551 Asynchronous Communications 
  342. Interface Adaptor (ACIA) hardware addresses of an Super Serial Card.  The 
  343. differences between the modem or printer port devices and a Super Serial Card 
  344. are:
  345. o    Speed - When software talks directly to the 6551 hardware addresses, the
  346.      maximum throughput rate is somewhere between 240 and 480 characters per 
  347.      second although any baud rate can be used.
  348. o    Delays - Since the IIe Startup application passes all characters from 
  349.      the modem or printer port to the Macintosh LC's serial driver, there may 
  350.      be a delay between the time you give the port device a character and
  351.      when the Macintosh serial driver actually sends it.
  352. o    6551 echo-mode - This 6551 mode (set by accessing the 6551 command 
  353.      register) is not supported by the modem and printer port devices.
  354. o    Hardware handshake lines - Since the Macintosh LC only has one input 
  355.      (HSKi) and one output (HSKo) handshake lines, not all 6551 hardware 
  356.      handshaking is available.  HSKi is mapped to the 6551 CTS line which 
  357.      cannot be read from software but does control handshaking.  HSKo is 
  358.      mapped to the 6551 DTR line and can be enabled or disabled with the 6551 
  359.      command register..  The DCD and DSR 6551 inputs will always return true.
  360.  
  361.  
  362. Mouse
  363.  
  364. The mouse device can be mapped to any slot space except slot 3 (where the 
  365. video firmware always resides) or slot 6 (where the Apple Disk 5.25 always 
  366. resides).  The mouse pseudo-I/O device is compatible with software that uses 
  367. the standard AppleMouse II or Apple IIc mouse firmware.  The AppleMouse II 
  368. hardware is not emulated by this pseudo-I/O device.
  369.  
  370. Mouse tracking (mouse speed) can be set by the Apple IIe Card option panel.
  371.  
  372. Network Printer
  373.  
  374. The network printer device can be mapped to any slot space except slot 3 
  375. (where the video firmware always resides) or slot 6 (where the Apple Disk 
  376. 5.25 always resides).  The network printer pseudo-I/O device allows 
  377. applications to print to a LaserWriter printer or to an ImageWriter printer 
  378. with the LocalTalk option installed as if it were printing to an ImageWriter 
  379. printer connected to a Super Serial Card.  The network printer pseudo-I/O 
  380. device's firmware looks very much like Super Serial Card emulation performed 
  381. by the Remote Print Manager on an Apple IIe Workstation card.
  382.  
  383. SmartPort Devices
  384.  
  385. The SmartPort devices can be mapped only into slot 5.  SmartPort on the Apple 
  386. IIe Card can support one external UniDisk 3.5 drive and either one or two 
  387. internal Macintosh LC SuperDrives.
  388.  
  389. If an UniDisk 3.5 drive is used, it is connected to the Apple IIe Card's disk 
  390. drive connector and is controlled by the IWM disk controller unit on the 
  391. Apple IIe Card.
  392.  
  393. The internal Macintosh LC SuperDrives return the same device type and subtype 
  394. as an UniDisk 3.5 drive.  However, the internal SuperDrives only support 
  395. standard SmartPort calls and do not support any UniDisk 3.5 specific 
  396. SmartPort calls.  The internal SuperDrives are controlled by the Macintosh LC 
  397. hardware and cannot be accessed by the IWM on the Apple IIe Card.
  398.  
  399. Apple Disk 5.25 Drives
  400.  
  401. The Apple Disk 5.25 drives can be mapped only into slot 6.  Either one or two 
  402. external Apple Disk 5.25 drives can be connected to the Apple IIe Card's disk 
  403. drive connector and they are controlled by the IWM disk controller unit on 
  404. the Apple IIe Card.
  405.  
  406. Copy protection schemes that access video or I/O locations between sector or 
  407. block reads and that depend on timing and will most likely fail on the Apple 
  408. IIe Card.
  409.  
  410. Clock
  411.  
  412. The clock device can be mapped to any slot space except slot 3 (where the 
  413. video firmware always resides) or slot 6 (where the Apple Disk 5.25 always 
  414. resides).  The firmware of the clock pseudo-I/O device looks just like the 
  415. firmware of a ProDOS compatible clock.  Clock card hardware is not emulated.
  416.  
  417.  
  418. Conclusion
  419.  
  420. Most current Apple IIe applications run perfectly on the Apple IIe Card with 
  421. no changes.  By avoiding the few known differences listed in this Technical 
  422. Note, you should be able to write new Apple IIe applications without adding 
  423. code to special case for the Apple IIe Card.  In applications that have 
  424. special timing requirements, you can force the Apple IIe Card to run at 1 MHz 
  425. by identifying the Apple IIe Card and using the processor speed routines 
  426. supplied in this Note.
  427.  
  428.  
  429. Further Reference
  430. _____________________________________________________________________________
  431.   o   Apple IIe Card for the Macintosh LC User's Manual
  432.   o   Apple IIe Technical Reference Manual
  433.   o   Apple IIc Technical Reference Manual
  434.   o   Apple IIgs Firmware Reference
  435.   o   Apple II Memory Expansion Card Reference Manual
  436.   o   AppleMouse II User's Manual
  437.   o   ProDOS 8 Technical Reference Manual
  438.   o   Apple II Miscellaneous Technical Note #2: Apple II Family 
  439.       Identification Routines
  440.   o   Apple II Miscellaneous Technical Note #7: Apple II Family
  441.       Identification
  442.   o   SmartPort Technical Note #4, SmartPort Device Types
  443.   o   SmartPort Technical Note #7, SmartPort Subtype Codes
  444.  
  445.